/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {

    }
}
 class Circle{
double a;

     public Circle(double a) {
         this.a = a;
     }
    double area() throws CircleException{
         if(this.a<0){
             throw new  CircleException(this.a);
         }
         return 3.14*a*a;
     }
 }
class CircleException extends Exception{
double r;

    public CircleException(double r) {
        super();
        this.r = r;
    }

   void print(){
       System.out.println("圆半径为"+this.r+"不合理");
   }

}
class Person{
    String name;
    String sex;
    int age;

    public Person() {
    }

    public Person(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public String getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void print(){
        System.out.println("name:"+name+";");
        System.out.println("sex:"+sex+";");
        System.out.println("age:"+age);
    }
}
class StudentOf2019EE{
    private String name;
    private int money;
    private static int numbreOfObjects=0;
    private static int classMoney=0;
    public StudentOf2019EE(){
        numbreOfObjects++;
    }
    public StudentOf2019EE(String name){
        this.name=name;
        money=100;
        numbreOfObjects++;
    }
    public StudentOf2019EE(String name,int mongey){
        this.name=name;
        this.money=mongey;
        numbreOfObjects++;
    }

    public static int getNumbreOfObjects() {
        return numbreOfObjects;
    }

    public static int getClassMoney() {
        return classMoney;
    }

    public void setName(String name){
        this.name=name;
    }
    public void setMoney(int q){
        this.money=q;
    }
    public String getName(){
        return name;
    }
    public int getMoney(){
        return money;
    }
    public void payClazzMoney(int amount){
        if(getMoney()>=amount){
            money-=amount;
            classMoney+=amount;
        }else{
            money=0;
            classMoney+=getMoney();
        }
    }
    public static void clazzActivity(int amount){
        if(classMoney>amount){
            classMoney-=amount;
        } else{
            classMoney=0;
        }
    }
}